﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OUnsuitableProdList.aspx.cs" Inherits="IHISCETeim.Web.MachineSys.MacModel.OUnsuitableProdList" %>


<form id="pagerForm" method="post" action="MacModel/OUnsuitableProdList.aspx">
<input type="hidden" name="SerialNumber" value="<%=SerialNumber %>" />
<input type="hidden" name="StampNo" value="<%=StampNo %>" />
<input type="hidden" name="ItemCode" value="<%=ItemCode %>" />
<input type="hidden" name="SupplerName" value="<%=SupplerName %>" />
<input type="hidden" name="DownlineDateFrom" value="<%=DownlineDateFrom %>" />
<input type="hidden" name="DownlineDateTo" value="<%=DownlineDateTo %>" />
<input type="hidden" name="ExportFileName" value="<%=ExportFileName %>" />

<input type="hidden" name="orderField" value="<%=orderField %>" />
<input type="hidden" name="orderDirection" value="<%=orderDirection %>" />
<input type="hidden" name="pageNum" value="1" />
<input type="hidden" name="numPerPage" value="<%=numPerPage %>" />
</form>
<form id="form1" runat="server" method="post" action="MacModel/OUnsuitableProdList.aspx" onsubmit="return navTabSearch(this);">
<div class="pageHeader">
    <div class="searchBar">
        <table class="searchContent">
            <tr>
                <td>
                    机号： 
                </td>
                <td>
                    <input name="SerialNumber"  type="text" value="<%=SerialNumber %>"  />
                </td>
                <td>
                    票号NO： 
                </td>
                <td>
                   <input name="StampNo" size="5" type="text" value="<%=StampNo %>"  />
                </td>
                <td>
                    物料号/名称： 
                </td>
                <td>
                   <input name="ItemCode" type="text" value="<%=ItemCode %>"  />
                </td>
                <td>
                    供应商： 
                </td>
                <td>
                   <input name="SupplerName" type="text" value="<%=SupplerName %>"  />
                </td>
            </tr>
            <tr>
                <td>发行时间：</td>
                <td>
                    从<input name="DownlineDateFrom" class="date" type="text" value="<%=DownlineDateFrom %>"  />到<input name="DownlineDateTo" type="text" class="date" value="<%=DownlineDateTo %>"  />
                </td>
                <td>
                    描述:
                </td>
                <td  colspan="4">
                     <input name="ExportFileName" type="text" value="<%=ExportFileName %>"  />
                </td>
                <td>
                    <div class="subBar">
                        <ul>
                        <li>
                            <div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div>
                        </li>
                    </ul>
                    </div>
                </td>
            </tr>
        </table>
        
    </div>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
          <%--<% if (HasPower(IHISCETeim.Web.Permission.新增))
             {%>
            <li><a class="add" href="MacModel/OUnsuitableProdAdd.aspx" target="navTab" rel="OUnsuitableProdAdd"  title="添加不适合品处理票"><span>添加</span></a></li>
           <%} %>--%>
            <% if (HasPower(IHISCETeim.Web.Permission.新增))
             {%>
            <li><a class="add" href="MacModel/OUnsuitableProdAddV2.aspx" target="navTab" rel="OUnsuitableProdAdd"  title="添加不适合品处理票"><span>添加</span></a></li>
           <%} %>
            <% if (HasPower(IHISCETeim.Web.Permission.新增))
             {%>
            <li><a class="add" href="MacModel/OUnsuitableProdEditV2.aspx?UnsuitabledID={sid_user}&addType=1" target="navTab" rel="OUnsuitableProdEdit"  title="补充及追加不适合品处理票"><span>补充及追加</span></a></li>
           <%} %>

          <%--  <% if (HasPower(IHISCETeim.Web.Permission.修改))
              {%>
            <li><a class="edit" href="MacModel/OUnsuitableProdEdit.aspx?UnsuitabledID={sid_user}&addType=0" target="navTab" rel="OUnsuitableProdEdit"  title="修改不适合品处理票"  ><span>修改</span></a></li>
          <%} %>--%>
           <% if (HasPower(IHISCETeim.Web.Permission.修改))
              {%>
            <li><a class="edit" href="MacModel/OUnsuitableProdEditV2.aspx?UnsuitabledID={sid_user}&addType=0" target="navTab" rel="OUnsuitableProdEdit"  title="修改不适合品处理票"  ><span>修改</span></a></li>
          <%} %>
            <% if (HasPower(IHISCETeim.Web.Permission.删除))
               {%>
            <li><a class="delete" href="sysAjaxDone.ashx?ajaxmethod=deleteOUnsuitableProd&UnsuitabledID={sid_user}" target="ajaxTodo" title="确定要删除吗?"><span>删除</span></a></li>
           <%} %>
           <% if (HasPower(IHISCETeim.Web.Permission.导出))
               {%>
            <li><a class="icon" href="<%=ExportExcelWebUrl %>/MacModel/ExportOUnsuitableProdManageList.aspx?SerialNumber=<%=SerialNumber %>&StampNo=<%=StampNo %>&ItemCode=<%=ItemCode %>&SupplerName=<%=SupplerName %>&DownlineDateFrom=<%=DownlineDateFrom %>&DownlineDateTo=<%=DownlineDateTo %>" target="_blank"><span>导出管控表(财务)</span></a></li>
           <%} %>

            <% if (HasPower(IHISCETeim.Web.Permission.导出))
               {%>
            <li><a class="icon" href="<%=ExportExcelWebUrl %>/MacModel/BatchExportOUnsuitableProdList.aspx?SerialNumber=<%=SerialNumber %>&StampNo=<%=StampNo %>&ItemCode=<%=ItemCode %>&SupplerName=<%=SupplerName %>&DownlineDateFrom=<%=DownlineDateFrom %>&DownlineDateTo=<%=DownlineDateTo %>" target="_blank"><span>批量导出(质管)</span></a></li>
           <%} %>
           
        </ul>
    </div>
    <asp:repeater id="rpMenu" runat="server">
        <HeaderTemplate>
        <table class="table" width="1500" layouth="138">
        <thead>
            <tr  >                
                <th width="80" <%=GetDataListOrder("StampNo") %>>
                   票号NO
                </th>
                <th  width="80" <%=GetDataListOrder("Worker") %>>编制</th>
                <th <%=GetDataListOrder("IssueDate") %>>
                    发行时间
                </th>
                <th <%=GetDataListOrder("MacType") %>>
                    机种
                </th>
                <th <%=GetDataListOrder("SerialNumber") %>>
                    机器编号
                </th>
                <th <%=GetDataListOrder("ItemCode") %>>
                    图号
                </th>
                <th <%=GetDataListOrder("ItemName") %>>
                    物料名称
                </th>
                <th width="80" <%=GetDataListOrder("SupplerName") %>>
                    供应商
                </th>
                <th <%=GetDataListOrder("PartNum") %>>
                    零件号
                </th>
                <th align="center"> 数量</th>
                <th>补偿金额合计</th>
                <th>不适合现象描述</th>
                <th>提交金额</th>
                <th>索赔结算情况</th>
                <th>索赔收入差异</th>

                <th>IK件结案状态</th>
                <th>IK件相关费用</th>
            </tr>
        </thead>
        <tbody>
        </HeaderTemplate>
        <ItemTemplate>
            <tr target="sid_user" rel="<%# Eval("UnsuitabledID") %>">
				<td><a style=" font-weight:bold;" href="<%=ExportExcelWebUrl %>/MacModel/ExportOUnsuitableProdList.aspx?ID=<%# Eval("UnsuitabledID") %>" target="_blank"><%# Eval("StampNo")%></a></td>
				<td><%# Eval("Worker")%></td>
                <td><%# Convert.ToDateTime( Eval("IssueDate")).ToString("yyyy-MM-dd")%></td>
				<td><%# Eval("MacType")%></td>
				<td><%# Eval("SerialNumber")%></td>
				<td><%# Eval("ItemCode")%></td>
				<td><%# Eval("ItemName")%></td>
                <td><%# (Eval("LoseCtrDpt").ToString().ToUpper() != "IK") &&  (Eval("SupplerName").ToString().ToUpper()=="IK")? "<a style='color:red'> * </a>" : ""%><a  style=" font-weight:<%# string.IsNullOrEmpty(Eval("SupplerReplyFileName").ToString())?"":"bold" %>;" href="MacModel/OUnsuitableProdSupper.aspx?UnsuitabledID=<%# Eval("UnsuitabledID") %>" target="dialog" rel="OUnsuitableProdSupper"><%# Eval("SupplerName")%></a></td>
                <td><%# Eval("PartNum")%></td>
                <td><%# Eval("Quantity")%></td>
                <td><%# Eval("LoseTotal")%></td>
                <td><%# IHISCETeim.Library.StringHelper.GetStringLength(Eval("ExportFileName").ToString(), 20)%></td>
                <td>
                <a class="btnEditMoney" href="MacModel/OUnsuitableProdUpdateSubmit.aspx?UnsuitabledID=<%# Eval("UnsuitabledID") %>" target="dialog" title="[处理票号:<%# Eval("StampNo") %>]提交金额信息"
                rel="OUnsuitableProdUpdateSubmit" max="false" mask="true" maxable="false" minable="false" resizable="false"
                drawable="true" width="400" height="320" >
                【￥<%# Eval("SubmitJinE")%>】<%# Eval("SubmitDate")%></a>
                </td>
                <td><a class="btnDiffAnalyse" href="MacModel/OUnsuitableProdUpdateClaim.aspx?UnsuitabledID=<%# Eval("UnsuitabledID") %>" target="dialog" title="[处理票号:<%# Eval("StampNo") %>]索赔结算信息"
                rel="OUnsuitableProdUpdateClaim" max="false" mask="true" maxable="false" minable="false" 
                drawable="true" width="830" height="460">
                【￥<%# Eval("ClaimRMB")%>】<%# Eval("ClaimOpenDate")%></a>
                </td>

                <td>
                    <a class="btnDiffAnalyse" href="MacModel/OUnsuitableProdUpdateClaimAnalyze.aspx?UnsuitabledID=<%# Eval("UnsuitabledID") %>" target="dialog" title="[处理票号:<%# Eval("StampNo") %>]索赔收入差异分析"
                rel="OUnsuitableProdUpdateClaimAnalyze" max="false" mask="true" maxable="false" minable="false" 
                drawable="true" width="830" height="460">
                        <%# Convert.ToDecimal(Eval("ClaimRMB")) - Convert.ToDecimal(Eval("SubmitJinE"))%>
                    </a>
                </td>

                <td>
                    <%#GetIKCaseStatus(Eval("UnsuitabledID"), Eval("SupplerName"), Eval("IKCaseStatus"), Eval("LoseCtrDpt"))%>
                </td>
                <td>
                    <%#GetIKReturn(Eval("UnsuitabledID"), Eval("SupplerName"))%>
                </td>
			</tr>
        </ItemTemplate>
        <FooterTemplate>
            </tbody>
         </table>
        </FooterTemplate>
    </asp:repeater>
    <div class="panelBar">
        <div class="pages">
            <span>显示</span>
            <select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
               <%=SetnumPerPage() %>
            </select>
            <span>条，共<%=TotalCount%>条</span>
        </div>
        <div class="pagination" targettype="navTab" totalcount="<%=TotalCount%>" numperpage="<%=numPerPage %>"
            pagenumshown="10" currentpage="<%=pageNum %>">
        </div>
    </div>
</div>
</form>
